<template>
  <el-carousel :interval="4000" height="600px" arrow="always" loop="true">
    <el-carousel-item class="item-image" v-for="item in LbList" :key="item">
       <img :src="item.picUrl" class="image">
    </el-carousel-item>
  </el-carousel>
</template>
<script>
import { listLB } from "@/api/system/menu";
export default {
  name: "menu",
  data() {
    return {
      LbList:[],
            // 查询参数
      queryParams: {
        type:2
      },
    }
  },
    created() {
    this.getList();
  },
  methods:{
          /** 轮播图*/
    getList() {
      listLB(this.queryParams).then(response => {
        console.log(response)
        this.LbList = response.rows;
      });
    },
  }
}
</script>

<style rel="stylesheet/scss" lang="scss">
  .item-image{
    top:20rpx;
  }
  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
  .image{
    height:100%;
    width:100%;
  }
</style>